<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Popover 弹出框 | MyUI 4.x</title>
    <meta name="generator" content="VuePress 1.5.0">
    <link rel="icon" href="/my/favicon.ico">
    <script>
      var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?c4e5f73318b5cb0c389e3d9a05f831cc";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
      })();
    </script>
    <meta name="description" content="MyUI是美亚柏科旗下新德汇出品的Web前端一站式项目工程框架，专注于公检法行业中台系统快速搭建，框架已在多个项目实战检验。">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Expires" content="0">
    <link rel="preload" href="/my/assets/css/0.styles.3b7da768.css" as="style"><link rel="preload" href="/my/assets/js/app.145deadf.js" as="script"><link rel="preload" href="/my/assets/js/546.c48d7d92.js" as="script"><link rel="preload" href="/my/assets/js/1306.78ea12aa.js" as="script"><link rel="preload" href="/my/assets/js/974.ffa6c050.js" as="script">
    <link rel="stylesheet" href="/my/assets/css/0.styles.3b7da768.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/my/" class="home-link router-link-active"><img src="/my/img/logo.png" alt="MyUI 4.x" class="logo"> <span class="site-name can-hide">MyUI 4.x</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/my/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/my/ui/components/" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="/my/ui/charts/" class="nav-link">
  图表
</a></div><div class="nav-item"><a href="/my/ui/map/" class="nav-link">
  地图
</a></div><div class="nav-item"><a href="/my/ui/go/" class="nav-link">
  关系图
</a></div><div class="nav-item"><a href="/my/ui/icon/" class="nav-link">
  图标
</a></div><div class="nav-item"><a href="/my/ui/pages/" class="nav-link">
  页面
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="JSDoc" class="dropdown-title"><span class="title">JSDoc</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my/api/components.html" class="nav-link">
  基础组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/utils.html" class="nav-link">
  工具函数
</a></li><li class="dropdown-item"><!----> <a href="/my/api/charts.html" class="nav-link">
  图表组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/map.html" class="nav-link">
  地图组件
</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/my/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/my/ui/components/" class="nav-link">
  组件
</a></div><div class="nav-item"><a href="/my/ui/charts/" class="nav-link">
  图表
</a></div><div class="nav-item"><a href="/my/ui/map/" class="nav-link">
  地图
</a></div><div class="nav-item"><a href="/my/ui/go/" class="nav-link">
  关系图
</a></div><div class="nav-item"><a href="/my/ui/icon/" class="nav-link">
  图标
</a></div><div class="nav-item"><a href="/my/ui/pages/" class="nav-link">
  页面
</a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="JSDoc" class="dropdown-title"><span class="title">JSDoc</span> <span class="arrow right"></span></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/my/api/components.html" class="nav-link">
  基础组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/utils.html" class="nav-link">
  工具函数
</a></li><li class="dropdown-item"><!----> <a href="/my/api/charts.html" class="nav-link">
  图表组件
</a></li><li class="dropdown-item"><!----> <a href="/my/api/map.html" class="nav-link">
  地图组件
</a></li></ul></div></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Basic</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Form</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Data</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Notice</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>Navigation</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>Others</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/my/element/backtop.html" class="sidebar-link">Backtop 回到顶部</a></li><li><a href="/my/element/calendar.html" class="sidebar-link">Calendar calendar</a></li><li><a href="/my/element/card.html" class="sidebar-link">Card 卡片</a></li><li><a href="/my/element/carousel.html" class="sidebar-link">Carousel 走马灯</a></li><li><a href="/my/element/collapse.html" class="sidebar-link">Collapse 折叠面板</a></li><li><a href="/my/element/dialog.html" class="sidebar-link">Dialog 对话框</a></li><li><a href="/my/element/divider.html" class="sidebar-link">Divider 分割线</a></li><li><a href="/my/element/drawer.html" class="sidebar-link">Drawer 抽屉</a></li><li><a href="/my/element/image.html" class="sidebar-link">Image 图片</a></li><li><a href="/my/element/infiniteScroll.html" class="sidebar-link">InfiniteScroll 无限滚动</a></li><li><a href="/my/element/popconfirm.html" class="sidebar-link">Popconfirm 气泡确认框</a></li><li><a href="/my/element/popover.html" aria-current="page" class="active sidebar-link">Popover 弹出框</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/my/element/popover.html#基础用法" class="sidebar-link">基础用法</a></li><li class="sidebar-sub-header"><a href="/my/element/popover.html#嵌套信息" class="sidebar-link">嵌套信息</a></li><li class="sidebar-sub-header"><a href="/my/element/popover.html#嵌套操作" class="sidebar-link">嵌套操作</a></li><li class="sidebar-sub-header"><a href="/my/element/popover.html#attributes" class="sidebar-link">Attributes</a></li><li class="sidebar-sub-header"><a href="/my/element/popover.html#slot" class="sidebar-link">Slot</a></li><li class="sidebar-sub-header"><a href="/my/element/popover.html#events" class="sidebar-link">Events</a></li></ul></li><li><a href="/my/element/timeline.html" class="sidebar-link">Timeline 时间线</a></li><li><a href="/my/element/tooltip.html" class="sidebar-link">Tooltip 文字提示</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="popover-弹出框"><a href="#popover-弹出框" class="header-anchor">#</a> Popover 弹出框</h1> <h2 id="基础用法"><a href="#基础用法" class="header-anchor">#</a> 基础用法</h2> <p>Popover 的属性与 Tooltip 很类似，它们都是基于<code>Vue-popper</code>开发的，因此对于重复属性，请参考 Tooltip 的文档，在此文档中不做详尽解释。</p> <!----><h2 id="嵌套信息"><a href="#嵌套信息" class="header-anchor">#</a> 嵌套信息</h2> <p>可以在 Popover 中嵌套多种类型信息，以下为嵌套表格的例子。</p> <!----><h2 id="嵌套操作"><a href="#嵌套操作" class="header-anchor">#</a> 嵌套操作</h2> <p>当然，你还可以嵌套操作，这相比 Dialog 更为轻量：</p> <!----><h2 id="attributes"><a href="#attributes" class="header-anchor">#</a> Attributes</h2> <table><thead><tr><th>参数</th> <th>说明</th> <th>类型</th> <th>可选值</th> <th>默认值</th></tr></thead> <tbody><tr><td>trigger</td> <td>触发方式</td> <td>String</td> <td>click/focus/hover/manual</td> <td>click</td></tr> <tr><td>title</td> <td>标题</td> <td>String</td> <td>—</td> <td>—</td></tr> <tr><td>content</td> <td>显示的内容，也可以通过 <code>slot</code> 传入 DOM</td> <td>String</td> <td>—</td> <td>—</td></tr> <tr><td>width</td> <td>宽度</td> <td>String, Number</td> <td>—</td> <td>最小宽度 150px</td></tr> <tr><td>placement</td> <td>出现位置</td> <td>String</td> <td>top/top-start/top-end/bottom/bottom-start/bottom-end/left/left-start/left-end/right/right-start/right-end</td> <td>bottom</td></tr> <tr><td>disabled</td> <td>Popover 是否可用</td> <td>Boolean</td> <td>—</td> <td>false</td></tr> <tr><td>value / v-model</td> <td>状态是否可见</td> <td>Boolean</td> <td>—</td> <td>false</td></tr> <tr><td>offset</td> <td>出现位置的偏移量</td> <td>Number</td> <td>—</td> <td>0</td></tr> <tr><td>transition</td> <td>定义渐变动画</td> <td>String</td> <td>—</td> <td>fade-in-linear</td></tr> <tr><td>visible-arrow</td> <td>是否显示 Tooltip 箭头，更多参数可见<a href="https://github.com/element-component/vue-popper" target="_blank" rel="noopener noreferrer">Vue-popper<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></td> <td>Boolean</td> <td>—</td> <td>true</td></tr> <tr><td>popper-options</td> <td><a href="https://popper.js.org/documentation.html" target="_blank" rel="noopener noreferrer">popper.js<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> 的参数</td> <td>Object</td> <td>参考 <a href="https://popper.js.org/documentation.html" target="_blank" rel="noopener noreferrer">popper.js<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a> 文档</td> <td><code>{ boundariesElement: 'body', gpuAcceleration: false }</code></td></tr> <tr><td>popper-class</td> <td>为 popper 添加类名</td> <td>String</td> <td>—</td> <td>—</td></tr> <tr><td>open-delay</td> <td>触发方式为 hover 时的显示延迟，单位为毫秒</td> <td>Number</td> <td>—</td> <td>—</td></tr> <tr><td>close-delay</td> <td>触发方式为 hover 时的隐藏延迟，单位为毫秒</td> <td>number</td> <td>—</td> <td>200</td></tr> <tr><td>tabindex</td> <td>Popover 组件的 <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex" target="_blank" rel="noopener noreferrer">tabindex<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></td> <td>number</td> <td>—</td> <td>0</td></tr></tbody></table> <h2 id="slot"><a href="#slot" class="header-anchor">#</a> Slot</h2> <table><thead><tr><th>参数</th> <th>说明</th></tr></thead> <tbody><tr><td>—</td> <td>Popover 内嵌 HTML 文本</td></tr> <tr><td>reference</td> <td>触发 Popover 显示的 HTML 元素</td></tr></tbody></table> <h2 id="events"><a href="#events" class="header-anchor">#</a> Events</h2> <table><thead><tr><th>事件名称</th> <th>说明</th> <th>回调参数</th></tr></thead> <tbody><tr><td>show</td> <td>显示时触发</td> <td>—</td></tr> <tr><td>after-enter</td> <td>显示动画播放完毕后触发</td> <td>—</td></tr> <tr><td>hide</td> <td>隐藏时触发</td> <td>—</td></tr> <tr><td>after-leave</td> <td>隐藏动画播放完毕后触发</td> <td>—</td></tr></tbody></table></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/my/element/popconfirm.html" class="prev">
        Popconfirm 气泡确认框
      </a></span> <span class="next"><a href="/my/element/timeline.html">
        Timeline 时间线
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/my/assets/js/app.145deadf.js" defer></script><script src="/my/assets/js/546.c48d7d92.js" defer></script><script src="/my/assets/js/1306.78ea12aa.js" defer></script><script src="/my/assets/js/974.ffa6c050.js" defer></script>
  </body>
</html>
